Apparatus and job scheduling method thereof

ABSTRACT

An apparatus and a job scheduling method are provided. For example, the apparatus is a multi-core processing apparatus. The apparatus and method minimize performance degradation of a core caused by sharing resources by dynamically managing a maximum number of jobs assigned to each core of the apparatus. The apparatus includes at least one core including an active cycle counting unit configured to store a number of active cycles and a stall cycle counting unit configured to store a number of stall cycles and a job scheduler configured to assign at least one job to each of the at least one core, based on the number of active cycles and the number of stall cycles. When the ratio of the number of stall cycles to a number of active cycles for a core is too great, the job scheduler assigns fewer jobs to that core to improve performance.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of U.S. patent application Ser. No.14/606,395 filed on Jan. 27, 2015, which is a continuation of U.S.patent application Ser. No. 14/276,522 filed on May 13, 2014, whichclaims from the benefit under 35 U.S.C. §119(a) of Korean PatentApplication No. 10-2013-0054031 filed on May 13, 2013, in the KoreanIntellectual Property Office, the entire disclosure of which isincorporated herein by reference for all purposes.

BACKGROUND

1. Field

The following description relates to an apparatus and a job schedulingmethod thereof. More specifically, the following description relates toa multi-core processing apparatus and a job scheduling method thereofthat dynamically manage a maximum number of jobs assigned to each coreof the multi-core processing apparatus.

2. Description of Related Art

An application executed by a multi-core system, particularly ageneral-purpose application being executed by graphics processing units(GPUs), enables easy parallelization of a large amount of data to beprocessed, since there is no dependency between the data to beprocessed.

Furthermore, it is established that a maximum use of available computingresources has the effect of increasing the enhanced performance providedby parallelization. For example, in a scenario, an application maymainly use independent resources, such as a register file, a scratchpadmemory, a computing unit, and so on, in a core for each core. In thisscenario, as the number of jobs increases, the effects of memory accesslatency or pipeline latency is decreased because of the independence ofthe resources. Because latency is reduced, it improves overallperformance.

However, in a scenario in which an application mainly or entirely uses amemory shared by all cores, for example, there may be a case whereoverall performance is not improved by the parallel use of multiplecores due to maximum bandwidth limitations of a network and/or a memory,even though the number of simultaneously executing jobs is increased.Further, due to network congestion caused by excessive traffic, anddepletion of L2 cache capacity, there may also be a case whereperformance is actually degraded when the number of jobs is increased.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used as an aid in determining the scope of the claimed subjectmatter.

In one general aspect, an apparatus includes a core, including an activecycle counting unit configured to store a number of active cycles and astall cycle counting unit configured to store a number of stall cycles,and a job scheduler configured to assign one or more jobs to the core,wherein the number of jobs to be assigned to the core is based on thenumber of active cycles and the number of stall cycles.

The apparatus may further include a memory configured to store input andoutput data used by the core and the job schedule, and a networkconfigured to connect the job scheduler, the memory, and the core.

The core may further include a front end unit and an execution unit, andin response to instructions being transmitted to the execution unit, thefront end unit stores the number of active cycles and the number ofstall cycles in the active cycle counting unit and the stall cyclecounting unit, respectively.

The job scheduler may determine the number of jobs to be assigned to thecore based on a ratio of the number of stall cycles to the number ofactive cycles.

The apparatus may provide that in response to the ratio of a number ofstall cycles to a number of active cycles of the core exceeding athreshold, the job scheduler reduces the number of jobs to be assignedto the core.

The core may further include an L1 cache, and the job scheduler may befurther configured to adjust the number of jobs to be assigned to thecore in consideration of a consecutive input data size of jobs and aline size of the L1 cache.

In another general aspect, a job scheduling method of an apparatusperformed by a job scheduler includes calculating a ratio of a number ofstall cycles to a number of active cycles based on the number of activecycles and the number of stall cycles received from a core, and reducinga number of jobs to be assigned to a the core in response to the ratioof the number of stall cycles to the number of active cycles exceeding athreshold, and maintaining a number of jobs to be assigned to thespecific core in response to the ratio of the number of stall cycles tothe number of active cycles not exceeding the threshold.

The job scheduling method may further include, in response to a numberof jobs assigned to the core being less than an optimal number of jobsof the core, increasing the optimal number of jobs of the core, andassigning new jobs to the core.

The job scheduling method may further include, in response to a numberof jobs assigned to the core being greater than or equal to an optimalnumber of jobs of the core, omitting assigning new jobs to the core.

The job scheduling method may further include adjusting a number of jobssimultaneously assigned to the core in consideration of a consecutiveinput data size of jobs and a line size of an L1 cache included in thecore.

In another general aspect, a non-transitory computer-readable storagemedium storing a program for job scheduling, the program comprisinginstructions for causing a computer to carry out the method presentedabove.

In another general aspect, a multi-core processing apparatus includes aplurality of cores, each comprising an active cycle counting unitconfigured to store a number of active cycles and a stall cycle countingunit configured to store a number of stall cycles, a job schedulerconfigured to assign jobs to the cores, wherein the number of jobsassigned to each core is chosen to maximize normalized instructions percycle (IPC) for each core.

The apparatus may further provide each core further includes a front endunit and an execution unit, and in response to instructions beingtransmitted to the execution unit, the front end unit stores the numberof active cycles and the number of stall cycles in the active cyclecounting unit and the stall cycle counting unit, respectively.

The apparatus may further include a memory configured to store input andoutput data used by the cores and the job scheduler, and a networkconfigured to connect the job scheduler, the memory, and the cores.

The maximizing normalized instructions per cycle (IPC) for each core mayconsider bandwidth for at least one of the memory and the network.

The cores may share the memory and each core may include an L1 cachethat is not shared by the other cores.

The maximizing normalized instructions per cycle (IPC) for each core mayconsider consecutive input data size of jobs and a line size of the L1cache included in the core.

The maximizing normalized instructions per cycle (IPC) for each core mayconsider dependency information for the instructions.

The maximizing normalized instructions per cycle (IPC) for each core mayconsider processing requirements for a particular job.

The maximizing normalized instructions per cycle (IPC) for each core mayconsider availability of system resources.

Other features and aspects will be apparent from the following detaileddescription, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an example of a configuration ofa general multi-core system, according to an embodiment.

FIG. 2 is a graph illustrating an example of a change of instructionsper cycle (IPC) according to a number of jobs of each application,according to an embodiment.

FIG. 3 is a block diagram illustrating an example of a multi-core systemaccording to an aspect of an exemplary embodiment, according to anembodiment.

FIG. 4 is a flowchart illustrating an example method of dynamicscheduling of a multi-core system, according to an embodiment.

FIG. 5 is a block diagram illustrating an example of a multi-core systemaccording to an aspect of another embodiment.

FIG. 6 is a flowchart illustrating an example method of job schedulingof a multi-core system including L1 cache, according to an embodiment.

Throughout the drawings and the detailed description, unless otherwisedescribed or provided, the same drawing reference numerals will beunderstood to refer to the same elements, features, and structures. Thedrawings may not be to scale, and the relative size, proportions, anddepiction of elements in the drawings may be exaggerated for clarity,illustration, and convenience.

DETAILED DESCRIPTION

The following detailed description is provided to assist the reader ingaining a comprehensive understanding of the methods, apparatuses,and/or systems described herein. However, various changes,modifications, and equivalents of the systems, apparatuses and/ormethods described herein will be apparent to one of ordinary skill inthe art. The progression of processing steps and/or operations describedis an example; however, the sequence of and/or operations is not limitedto that set forth herein and may be changed as is known in the art, withthe exception of steps and/or operations necessarily occurring in acertain order. Also, descriptions of functions and constructions thatare well known to one of ordinary skill in the art may be omitted forincreased clarity and conciseness.

The features described herein may be embodied in different forms, andare not to be construed as being limited to the examples describedherein. Rather, the examples described herein have been provided so thatthis disclosure will be thorough and complete, and will convey the fullscope of the disclosure to one of ordinary skill in the art.

Hereinafter, examples of a multi-core system and a job scheduling methodthereof will be described in detail with reference to the accompanyingdrawings.

Embodiments provide a technology for scheduling to assign jobs to eachcore in a multi-core system by setting bounds on the number of jobs toavoid degrading performance.

FIG. 1 is a block diagram illustrating an example of a configuration ofa general multi-core system, according to an embodiment.

As illustrated in FIG. 1, an example multi-core system 1 is configuredto include a job scheduler 10, a plurality of cores 11, a plurality ofmemories 12, and a network 13 that connects the job scheduler 10, theplurality of cores 11 and the plurality of memories 12. The network 13may include wired connections, wireless connections, or a combination ofwired and wireless connections.

The job scheduler 10 distributes jobs to each core included in amulti-core system according to a state of resources of each coreincluded in the multi-core system. For example, a job refers to abundle, including a plurality of data, which are batch-processed by thecore.

The core 11 processes one or more assigned jobs. In this scenario, thecore 11 has a register file and a small-sized cache (private cache)and/or a memory (scratchpad memory). These resources allow jobs to bemanaged by being divided into units for independent execution, whichenables the jobs to be processed at the same time in one cycle.

The memory 12 stores input and output data, and is shared by all cores11. Because the memory 12 is shared, access to the memory 12 by thecores 11 is managed so as to ensure that access to the memory 12 by thecores 11 does not invalidate the contents of the memory 12.

The network 13 connects the job scheduler 10, the plurality of cores 11and the plurality of memories 12. The network 13 is a transmission pathof data and control signals. That is, the network allows the constituentparts of the multi-core system to share information with one another,where the information may be information that is processed orinformation about how to process other information.

The job scheduler 10 assigns a maximum number of jobs to be processed byeach core 11. The maximum number of jobs is based on the state ofresources available at the core 11. For example, the state of resourcesis derived from a state of a register file, a state of a shared memory,or another state indicative of the ability of the core 11 to processjobs.

However, in the case of an application mainly using a memory shared byall cores, for example, the memory 12 shown in FIG. 1, there ispotentially a scenario where performance is not improved due to amaximum bandwidth limit of the network 13 and the memory 12, even thoughthe number of simultaneous jobs is increased. In this situation, eventhough more jobs are being executed at the same time, some jobs areforced to wait due to maximum bandwidth limits of the network 13 and thememory 12. Further, due to network congestion caused by excessivetraffic, and depletion of L2 cache capacity, there may also be asituation where performance is even degraded when the number of jobs isincreased. In this situation, the overhead necessary to manage multiplejobs cause delays that would not be necessary if fewer jobs were beingexecuted.

FIG. 2 is a graph illustrating an example of a change of instructionsper cycle (IPC) according to the number of jobs for each application,according to an embodiment.

Instructions per cycle (IPC) is a metric for how effective parallelismis. The higher the value of IPC, the more processing is accomplished bya core for each clock cycle. Hence, since a processor generally has afixed clock rate, if the IPC value is greater it is possible for theprocessor to accomplish more because more processing is completed by thecores.

As illustrated in FIG. 2, in the case of application A, performance(normalized IPC) is improved to a point 20 where the number of jobs isfour. In this case, increasing the number of jobs to four increasesperformance, because application A includes jobs that are sufficientlyindependent to accomplish more up to this point. However, when thenumber of jobs exceeds four, performance is rather degraded. Asdiscussed above, such performance degradation potentially occurs becausejobs must share resources such as network and memory resources, and ifthere are too many jobs, it will create bottlenecks caused by sharingthese resources.

Similarly, in the case of application B, performance (normalized IPC) isimproved to a point 21 where the number of jobs is five, whereas whenthe number of jobs exceeds five, performance is degraded. In the case ofapplication C, performance (normalized IPC) is improved to a point 22where the number of jobs is two, whereas when the number of jobs exceedstwo, performance is degraded. For applications B and C, the issues aresimilar to the issues involved when the considering the performance ofapplication A, but applications B and C happen to have different optimalnumbers of jobs.

Therefore, it is helpful for scheduling to assign jobs to each corewithin the bounds of the number of jobs that would not degradeperformance. Such scheduling incorporates information about theparticular application and the resources at each core, so as to helpdetermine how to allocate jobs to cores so that jobs are allocated tocores until a point is reached whether allocating additional jobsimpairs performance.

FIG. 3 is a block diagram illustrating an example of a multi-core systemaccording to an aspect of an embodiment.

As illustrated in FIG. 3, an example multi-core system 3 is configuredto include a job scheduler 30, a plurality of cores 31, a plurality ofmemories 32, and a network 33 that connects the job scheduler 30, theplurality of cores 31 and the plurality of memories 32.

The job scheduler 30 distributes and assigns jobs to each core accordingto a state of resources of each of the plurality of cores 31, whichtogether constitute the cores of a multi-core system 3.

The core 31 processes one or a plurality of jobs assigned to it, such asby the job scheduler 30. In FIG. 3, one core 31 is illustrated in anexpanded manner to illustrate its constituent elements, and the othercores 31 are illustrated as other cores included in the plurality ofcores 31. When performing processing tasks assigned to it, the core 31includes resources such as one or more of a register file, a small-sizedcache (private cache), and a scratchpad memory. These resources provideworking memory for the core, so that jobs are managed by being dividedinto independent units, which enables the jobs to be processed at thesame time in one cycle.

The memory 32 stores input and output data, and is shared by all cores31. As discussed further, because the memory 32 is shared by all cores31, managing memory access is a part of successful parallelism.

The network 33 connects the job scheduler 30, a plurality of cores 31,and a plurality of memories 32, and is a transmission path of data andcontrol signals between these functional elements of the multi-coresystem 3.

Meanwhile, each core 31, in the example of FIG. 3, further includes afront end unit 300, an execution unit 310, a memory access unit 320, arecording unit 330, an active cycle counting unit 340, and a stall cyclecounting unit 350. The relationship and connectivity between theseelements of each core is illustrated in the left-most core presented inFIG. 3. Additionally, these functional elements of each core 31 areexamples, and in other embodiments other elements are included in one ormore of the cores 31, in lieu of or in addition to the units illustratedin FIG. 3

The front end unit 300 reads instructions of assigned jobs from thememory 32 or a cache (not shown), and transmits the instructions to theexecution unit 310. Thus, the role of the front end unit 300 is toprovide intake for instructions for a core from an appropriate source ofinstructions.

Furthermore, the front end unit 300 checks for dependencies betweeninstructions, and postpones transmission of instructions in a cycle whendependency is not resolved in that cycle. While postponing transmissionof instructions when dependency is not resolved in a given cycle slowsdown the processing, it is performed because if interdependentinstructions are processed before the dependency is resolved, incorrectresults potentially occur.

Transmission of instructions is also potentially held off if availablesystem resources are insufficient. In such a situation, the front endunit 300 delays transmission of instructions so as to wait for moresystem resources to become available. A stall condition is a condition,such as a dependency issue or a lack of system resources, in which validinstructions are not transmitted from the front end unit 300 to theexecution unit 310. When a stall condition occurs, a cycle passeswithout instructions being transmitted for execution and henceperformance suffers. Herein, a cycle in which the stall condition occursis referred to as a stall cycle.

Further, an active condition is a condition in which the front end unit300 transmits valid instructions to the execution unit 310 forexecution. A cycle in which the active condition occurs is referred toas an active cycle.

The execution unit 310 processes data input from the front end unit 300according to a type of instructions that specifies how the data input isto be processed.

The memory access unit 320 reads data from the memory 32 and/or recordsdata in the memory 32.

The recording unit 330 records, in a register file (not shown) of thecore 31, data that is processed in the execution unit 310, or data thatis read from the memory 32 by the memory access unit 320.

The active cycle counting unit 340 records a number of active cycles inwhich instructions are transmitted from the front end unit 300 to theexecution unit 310. The stall cycle counting unit 350 records a numberof stall cycles when instructions are transmitted from the front endunit 300 to the execution unit 310. Thus, given that each cycle is anactive cycle or a stall cycle, the active cycle counting unit 340 andthe stall cycle counting unit 350 provide counts of the active cyclesand the stall cycles, in which the total number of the active cycles andthe stall cycles add up to the total number of cycles.

A cycle ratio between the number of stall cycles and the number ofactive cycles may be defined as in Equation 1. The greater the cycleratio, the less efficient the processing is, because the cycle ratio isgreater when there are more stall cycles or fewer active cycles, both ofwhich occur when the processing is less efficient.

(Cycle ratio)=(the number of stall cycles)/(the number of active cycles)  Equation 1

As mentioned above, depending on an application, in response to thenumber of jobs exceeding a threshold, performance is rather degraded. Asdiscussed above, the threshold number of jobs varies from application toapplication. Once the number of jobs exceeds such a threshold, thenumber of stall cycles increases. As a result, performance is degraded.However, until the number of jobs reaches the threshold, performanceimproves. Hence, to optimize performance, it is appropriate to increasethe number of jobs so that they reach but do not exceed the threshold.

Therefore, an increased cycle ratio leads to degradation of processingperformance of a core, and minimizing the cycle ratio is desirablebecause it indicates better processing performance for a core.

In a multi-core system 3 as shown in FIG. 3, in response to a cycleratio of a specific core among a plurality of cores 31 exceeding acertain value, the job scheduler 30 performs job scheduling by reducinga maximum number of jobs of the core. In an example, the certain valueis “1,” which is a value that, if exceeded, indicates that there aremore stall cycles than active cycles. However, other values are be usedfor the certain value in other embodiments. When the job schedulerreduces the maximum number of jobs of the core, it improves the cycleratio because if there are fewer jobs, it causes less need for stallcycles due to dependencies and resource overload, thereby reducing thenumber of stall cycles and improving the cycle ratio.

To this end, the job scheduler 30 receives a number of active cycles anda number of stall cycles of a core from the active cycle counting unit340 and the stall cycle counting unit 350 of each of the plurality ofcores 31. Based on these received numbers, the job scheduler 30 thencalculates a cycle ratio to perform job scheduling for each core. Asdiscussed above, in an example the job scheduler 30 operates such thatif the cycle ratio exceeds the certain value for a core, the jobscheduler 30 schedules fewer jobs for that core to improve itsperformance.

Alternatively, the front end unit 300 of each of the plurality of cores31 calculates a cycle ratio based on a number of active cycles and anumber of stall cycles of the core stored in the active cycle countingunit 340 and the stall cycle counting unit 350 of the core 31. In thiscase, the job scheduler 30 performs job scheduling by receiving a cycleratio of a core 31 from the front end unit 300 of each core 31, andadjusting a maximum number of jobs of each core 31.

FIG. 4 is a flowchart illustrating an example method of dynamicscheduling of a multi-core system.

FIG. 4 illustrates an example of job scheduling of a job schedulerperformed for one core among a multi core of the multi-core system inFIG. 3, according to an embodiment.

In S100, the method sets a maximum number of assigned jobs (N_max) forthe core as an optimal number of assigned jobs (N_optimal) for the core,and assigns as many jobs as the maximum number of assigned jobs. Forexample, the job scheduler sets a maximum number of assigned jobs(N_max) for the core as an optimal number of assigned jobs (N_optimal)for the core, and assigns as many jobs as the maximum number of assignedjobs.

In S110 the method performs the jobs. For example, the core performsjobs that the job scheduler assigns. In S 120 the method determines ifall jobs are completed. For example, if all jobs are not completed, thejob scheduler continues to perform jobs until all the jobs arecompleted.

When all the jobs are completed in the core, the core informs the jobscheduler of completion of jobs through the network. In addition, thecore also informs the job scheduler of a number of active cycles and anumber of stall cycles that occurred when performing the jobs. In S130,the method calculates a cycle ratio, and compares it to a certain value.For example, based on the number of active cycles and the number ofstall cycles transmitted from the core, the job scheduler calculates acycle ratio as defined in Table 1. In the example of FIG. 4, the certainvalue is 1, but other values of the certain value are used in otherexamples.

In S140, if the cycle ratio exceeds the certain value, the methoddecreases N_optimal for the core. For example, if a cycle ratio of acore exceeds 1, or another certain value, it means the stall cycles area high percentage cycles performed by the core, so the job schedulerreduces an optimal number of assigned jobs by 1. In alternativeembodiments, it is possible to reduce the number of jobs by a differentvalue. For example, in another embodiment, a heuristic is used todetermine how many jobs the job schedule is to decrease N_optimal by. Bycontrast, if a cycle ratio of a core does not exceed 1, or anothercertain value, it means the stall cycle does not occupy a highpercentage of the core, so the job scheduler does not change an optimalnumber of assigned jobs for the core.

In S150, the method assigns N new jobs to the core and compares N toN_optimal. For example, as all the jobs in the core are completed, thejob scheduler assigns N new jobs, and the job scheduler ascertains ifN<N_optimal. In S160, the method increases the optimal number ofassigned jobs by 1. In alternative embodiments, it is possible toincrease the number of jobs by a different value. For example, inanother embodiment, a heuristic is used to determine how many jobs bywhich the job schedule is to increase N_optimal.

Thus, if the number of newly assigned jobs (N) is less than the optimalnumber of assigned jobs (N_optimal), the method increases the optimalnumber of jobs the job scheduler increases the optimal number ofassigned jobs by 1 but, otherwise, does not change the optimal number ofassigned jobs (N_optimal).

In S170, the job scheduler assigns new jobs to the cores. For example,thereafter, if the number of newly assigned jobs (N) is less than theoptimal number of assigned jobs (N_optimal), the job scheduler assignsnew jobs to the cores.

In an embodiment, S100 to S170 are performed independently for eachcore. Therefore, an optimal number of assigned jobs suited to thecharacteristics of each core is assigned to each core. Furthermore, asthe optimal number of assigned jobs is dynamically increased ordecreased by the job scheduler in consideration of a cycle ratio, thenumber of jobs assigned to the cores is changed in real time so as notto dynamically improve performance of the cores.

Meanwhile, in an embodiment the job scheduler monitors for a certainperiod of time (T_monitor) to obtain an optimal number of assigned jobs(N_optimal) when performing jobs initially assigned to cores. Thecertain period of time (T_monitor) may be, for example, a time based onthe number of cycles taken to complete a first channel time allocation(CTA) in each core. The job scheduler obtains a cycle ratio (r) byconstantly observing a number of active cycles and a number of stallcycles for a certain period of time (T_monitor), and then obtains anoptimal number of assigned jobs (N_optimal) based on the cycle ratio(r).

FIG. 5 is a block diagram illustrating an example of a multi-core systemaccording to an aspect of another embodiment.

As illustrated in FIG. 5, the multi-core system 5 is configured toinclude a job scheduler 50, a plurality of cores 51, a plurality ofmemories 52, and a network 53 that connects the job scheduler 50, theplurality of cores 51 and the plurality of memories 52 to one another.Functions of each constituent element of the multi-core system 5 in FIG.5 correspond to functions of each corresponding constituent element ofthe multi-core system 3 in FIG. 3.

Additionally, each core 51 further includes a front end unit 500, anexecution unit 510, a memory access unit 520, a recording unit 530, anactive cycle counting unit 540, a stall cycle counting unit 550 and anL1 cache 560.

The front end unit 500 reads instructions for assigned jobs from amemory 52 or the L1 cache 560, and transmits the instructions to theexecution unit 510.

Additionally, the front end unit 500 checks dependencies betweeninstructions, and postpones transmission of instructions in a cycle whena dependency is not resolved in that cycle. Transmission of instructionsis also potentially postponed if system resources are insufficient. Inthe example of FIG. 5, a stall condition is a condition in which validinstructions are not transmitted from the front end unit 500 to theexecution unit 510, and a cycle in which the stall condition occurs is astall cycle.

Additionally, in this example, an active condition is a condition wherethe front end unit 500 transmits valid instructions to the executionunit 510, and a cycle in which the active condition occurs is an activecycle.

The execution unit 510 processes data input from the front end unit 500according to a type of instructions. As discussed above, theinstructions are received for assigned jobs from a memory 52 or the L1cache 560.

The memory access unit 520 reads data from the memory 52 and/or recordsdata in the memory 52.

The recording unit 530 records, in a register file (not shown) of thecore 51, data that is processed in the execution unit 510, or data thatis read from the memory 52 by the memory access unit 320.

The active cycle counting unit 540 records a number of active cyclesthat occur when instructions are transmitted from the front end unit 500to the execution unit 510. The stall cycle counting unit 550 records anumber of stall cycles that occur when instructions are transmitted fromthe front end unit 500 to the execution unit 510.

The L1 cache 560 temporarily stores jobs, instructions, data, andsimilar information, which are processed in the core 51. The L1 cachecontributes to the improvement of system performance. The L1 cache notonly has a fast access speed, because it takes less time to access thanmain memory, but the L1 cache is also processed independently for eachcore. However, conflicts between referenced data occur frequently. Cachememory is generally expensive, and hence only limited amounts areincluded in each core. Because limited amounts are available, only aportion of referenced data is accessible, which causes degradation inperformance. Therefore, when the L1 cache 560 is used, data localitybetween jobs assigned to cores is a consideration.

FIG. 6 is a flowchart illustrating an example method of job schedulingof a multi-core system including L1 cache, according to an embodiment.

In S200, the method stores, as a value to be compared (t_2), a quotientobtained by dividing a line size by a job size. For example, asillustrated in FIG. 6, a quotient, which is obtained by dividing a linesize (LS) of the L1 cache of a specific core by a consecutive input datasize of a job (JS: job size), is set as a value to be compared (t_r).

In S210, the method determines if the jobs are complete. For example, ifone job is performed in the core, the job scheduler compares the numberof jobs to be assigned to the core with the value to be compared (t_r).

In S220, the method compares the number of jobs (vs) to be assigned tot_r. For example, if the number of jobs (vs) to be assigned to the coreis not greater than the value to be compared (t_r), the core continues,and performs a next job, but when the number of jobs (vs) to be assignedto the core is greater than the value to be compared (t_r), in 230 themethod assigns new jobs. For example, the job scheduler assigns new jobsto the core.

If the value to be compared (t_r), that is, a quotient obtained bydividing a line size (LS) of the L1 cache of a certain core by aconsecutive input data size of a job (JS: job size), is the number ofassigned jobs (N), then input data of consecutive or adjacent jobs arelikely to be accessed by sharing one cache line. As a result, in amulti-core system including the L1 cache, the job scheduler does notassign new jobs every time each job is completed, but assigns new jobsafter waiting until it is possible to assign a number N of jobs at thesame time. Assigning N jobs at the same time as described improvesutilization of a cache line and thus further improves performance

The apparatuses and units described herein may be implemented usinghardware components. The hardware components may include, for example,controllers, sensors, processors, generators, drivers, and otherequivalent electronic components. The hardware components may beimplemented using one or more general-purpose or special purposecomputers, such as, for example, a processor, a controller and anarithmetic logic unit, a digital signal processor, a microcomputer, afield programmable array, a programmable logic unit, a microprocessor orany other device capable of responding to and executing instructions ina defined manner. The hardware components may run an operating system(OS) and one or more software applications that run on the OS. Thehardware components also may access, store, manipulate, process, andcreate data in response to execution of the software. For purpose ofsimplicity, the description of a processing device is used as singular;however, one skilled in the art will appreciated that a processingdevice may include multiple processing elements and multiple types ofprocessing elements. For example, a hardware component may includemultiple processors or a processor and a controller. In addition,different processing configurations are possible, such as parallelprocessors.

The methods described above can be written as a computer program, apiece of code, an instruction, or some combination thereof, forindependently or collectively instructing or configuring the processingdevice to operate as desired. Software and data may be embodiedpermanently or temporarily in any type of machine, component, physicalor virtual equipment, computer storage medium or device that is capableof providing instructions or data to or being interpreted by theprocessing device. The software also may be distributed over networkcoupled computer systems so that the software is stored and executed ina distributed fashion. In particular, the software and data may bestored by one or more non-transitory computer readable recordingmediums. The media may also include, alone or in combination with thesoftware program instructions, data files, data structures, and thelike. The non-transitory computer readable recording medium may includeany data storage device that can store data that can be thereafter readby a computer system or processing device. Examples of thenon-transitory computer readable recording medium include read-onlymemory (ROM), random-access memory (RAM), Compact Disc Read-only Memory(CD-ROMs), magnetic tapes, USBs, floppy disks, hard disks, opticalrecording media (e.g., CD-ROMs, or DVDs), and PC interfaces (e.g., PCI,PCI-express, WiFi, etc.). In addition, functional programs, codes, andcode segments for accomplishing the example disclosed herein can beconstrued by programmers skilled in the art based on the flow diagramsand block diagrams of the figures and their corresponding descriptionsas provided herein.

As a non-exhaustive illustration only, a terminal/device/unit describedherein may refer to mobile devices such as, for example, a cellularphone, a smart phone, a wearable smart device (such as, for example, aring, a watch, a pair of glasses, a bracelet, an ankle bracket, a belt,a necklace, an earring, a headband, a helmet, a device embedded in thecloths or the like), a personal computer (PC), a tablet personalcomputer (tablet), a phablet, a personal digital assistant (PDA), adigital camera, a portable game console, an MP3 player, aportable/personal multimedia player (PMP), a handheld e-book, an ultramobile personal computer (UMPC), a portable lab-top PC, a globalpositioning system (GPS) navigation, and devices such as a highdefinition television (HDTV), an optical disc player, a DVD player, aBlue-ray player, a setup box, or any other device capable of wirelesscommunication or network communication consistent with that disclosedherein. In a non-exhaustive example, the wearable device may beself-mountable on the body of the user, such as, for example, theglasses or the bracelet. In another non-exhaustive example, the wearabledevice may be mounted on the body of the user through an attachingdevice, such as, for example, attaching a smart phone or a tablet to thearm of a user using an armband, or hanging the wearable device aroundthe neck of a user using a lanyard.

A computing system or a computer may include a microprocessor that iselectrically connected to a bus, a user interface, and a memorycontroller, and may further include a flash memory device. The flashmemory device may store N-bit data via the memory controller. The N-bitdata may be data that has been processed and/or is to be processed bythe microprocessor, and N may be an integer equal to or greater than 1.If the computing system or computer is a mobile device, a battery may beprovided to supply power to operate the computing system or computer. Itwill be apparent to one of ordinary skill in the art that the computingsystem or computer may further include an application chipset, a cameraimage processor, a mobile Dynamic Random Access Memory (DRAM), and anyother device known to one of ordinary skill in the art to be included ina computing system or computer. The memory controller and the flashmemory device may constitute a solid-state drive or disk (SSD) that usesa non-volatile memory to store data.

While this disclosure includes specific examples, it will be apparent toone of ordinary skill in the art that various changes in form anddetails may be made in these examples without departing from the spiritand scope of the claims and their equivalents. The examples describedherein are to be considered in a descriptive sense only, and not forpurposes of limitation. Descriptions of features or aspects in eachexample are to be considered as being applicable to similar features oraspects in other examples. Suitable results may be achieved if thedescribed techniques are performed in a different order, and/or ifcomponents in a described system, architecture, device, or circuit arecombined in a different manner and/or replaced or supplemented by othercomponents or their equivalents. Therefore, the scope of the disclosureis defined not by the detailed description, but by the claims and theirequivalents, and all variations within the scope of the claims and theirequivalents are to be construed as being included in the disclosure.

What is claimed is:
 1. A job scheduling apparatus, comprising: a coreconfigured to process jobs; and a job scheduler configured to assignjobs to the core based on at least one of a number of active cycles anda number of stall cycles.
 2. The apparatus of claim 1, furthercomprising: a memory configured to store input and output data used bythe core and the job scheduler; and a network configured to connect thejob scheduler, the memory, and the core.
 3. The apparatus of claim 1,wherein the core comprises: an active cycle counting unit configured tostore the number of active cycles; and a stall cycle counting unitconfigured to store the number of stall cycles.
 4. The apparatus ofclaim 3, wherein the core further comprises a front end unit and anexecution unit, wherein, in response to the front end unit transmittinginstructions to the execution unit for execution, the front end unitcounts the number of active cycles and the number of stall cycles, andstores the number of active and stall cycles in the active cyclecounting unit and the stall cycle counting unit, respectively.
 5. Theapparatus of claim 4, wherein the front end unit generates the stallcycle in response to interdependence occurring between instructions in acycle.
 6. The apparatus of claim 1, wherein the job scheduler calculatesa cycle ratio of the number of stall cycles to the number of activecycles.
 7. The apparatus of claim 6, wherein the job scheduler adjusts anumber of jobs to be assigned to the core based on the calculated cycleratio.
 8. The apparatus of claim 7, wherein in response to thecalculated cycle ratio exceeding a threshold, the job schedulerdecreases the number of jobs to be assigned to the core.
 9. A jobscheduling method, comprising: setting an optimal number of assignedjobs for a core; assigning a number of assigned jobs corresponding tothe optimal number of assigned jobs to the core; receiving at least oneof a number of active cycles and a number of stall cycles from the corebased on completion of the assigned jobs; and adjusting the optimalnumber of assigned jobs for the core based on at least one of thereceived number of active cycles and the received number of stallcycles.
 10. The method of claim 9, wherein the adjusting of the optimalnumber of assigned jobs of the core comprises calculating a cycle ratiothat indicates the number of stall cycles to the number of activecycles, and using the calculated cycle ratio to adjust the optimalnumber of assigned jobs of the core.
 11. The method of claim 10, whereinthe adjusting of the optimal number of assigned jobs comprises reducingthe optimal number of assigned jobs of the core in response to thecalculated cycle ratio being greater than a threshold.
 12. The method ofclaim 10, wherein the adjusting of the optimal number of assigned jobscomprises maintaining the optimal number of assigned jobs in response tothe calculated ratio being less than the threshold.
 13. The method ofclaim 9, wherein the adjusting of the optimal number of assigned jobscomprises increasing the optimal number of jobs of the core in responseto a number of jobs to be newly assigned to the core being less than theoptimal number of assigned jobs.
 14. The method of claim 9, furthercomprising assigning new jobs to the core based on the number of jobs tobe newly assigned to the core and the adjusted optimal number ofassigned jobs.
 15. The method of claim 9, wherein the adjusting of theoptimal number of assigned jobs of the core further comprises assigningnew jobs to the core based on a line size of L1 cache and a consecutiveinput data size of a job.
 16. A multi-core processing apparatus,comprising: cores comprising an active cycle counting unit, which isconfigured to store a number of active cycles, and a stall cyclecounting unit, which is configured to store a number of stall cycles;and a job scheduler configured to assign to the cores a number of jobsdetermined to maximize Instructions Per Cycle (IPC) normalized for eachof the cores.
 17. The apparatus of claim 16, wherein each of the coresfurther comprises a front end unit and an execution unit, wherein inresponse to the front end unit transmitting instructions to theexecution unit for execution, the front end unit stores the number ofactive cycles and the number of stall cycles in the active cyclecounting unit and the stall cycle counting unit, respectively.
 18. Theapparatus of claim 16, further comprising: a memory configured to storeinput and output data used by the core and the job scheduler; and anetwork configured to connect the job scheduler, the memory, and thecore.
 19. The apparatus of claim 18, wherein the maximizing of thenormalized IPC comprises considering a bandwidth of at least one of thememory and the network.
 20. The apparatus of claim 18, wherein the coresshare the memory, and each of the cores has L1 cache that is not sharedby other cores.
 21. The apparatus of claim 20, wherein the maximizing ofthe IPC normalized for each of the cores comprises considering aconsecutive input data size of jobs and a line size of the L1 cacheincluded in the cores.
 22. The apparatus of claim 16, wherein themaximizing of the IPC normalized for each of the cores comprisesconsidering information on interdependence between instructions.
 23. Theapparatus of claim 16, wherein the maximizing of the IPC normalized foreach of the cores comprises considering a request for processing aspecific job.
 24. The apparatus of claim 16, wherein the maximizing ofthe IPC normalized for each of the cores comprises consideringperformance of system resources.